package bean;

import java.sql.Date;

/**
 * Bean object for storage of items from the AuctionBid table within the database, contains getters and setters.
 * 
 * @author Sander Meijer & Stijn Kliemesch
 *  
 */
public class BidBean {

	private int 	auctionID;	
	private int 	bidUserID;
	private String	userName;
	private int 	bidValue;
	private Date 	time;

	/**
	 * <b>Constructor</b></br>
	 * Creates an empty {@link BidBean}.
	 */
	public BidBean() {
	}

	/**
	 * <b>Constructor</b></br>
	 * Creates a {@link BidBean} with the following parameters.
	 * @param the_auctionID
	 * @param the_UserID
	 * @param the_userName
	 * @param the_bidValue
	 * @param the_time
	 */
	public BidBean(
			int the_auctionID, 		int the_UserID,
			String the_userName,	int the_bidValue, 	
			Date the_time) {
		auctionID	= the_auctionID;
		bidUserID 	= the_UserID;
		userName	= the_userName;
		bidValue 	= the_bidValue;
		time 		= the_time;
	}

	public int 		getAuctionID()	{ return auctionID;	}
	public int 		getBidUserID() 	{ return bidUserID; }
	public String	getUserName()	{ return userName;	}
	public int		getBidValue() 	{ return bidValue; 	} 
	public Date		getTime() 		{ return time;		}

	public void setAuctionID	(int auctionID)		{ this.auctionID = auctionID;	}
	public void setBidUserID	(int bidUserID)		{ this.bidUserID = bidUserID;	}
	public void setUsername		(String userName)	{ this.userName = userName;		}
	public void setBidValue		(int bidValue) 		{ this.bidValue = bidValue;		}
	public void setTime			(Date time) 		{ this.time = time; 			}	
	
	/**
	 * ToString method, returns a string with all the information within this {@link BidBean}
	 * @return String
	 */
	public String toString(){
		return "AuctionID: " + auctionID + " UserID: " + bidUserID + " value: " + bidValue + " time: " + time;
	}
}
